export default [
  {
    path: '/user',
    layout: false,
    routes: [
      { path: '/user/login', component: './User/Login' },
      { path: '/user/register', component: './User/Register' },
    ],
  },
  { path: '/welcome', icon: 'smile', component: './Welcome', name: '欢迎页' },
  {
    path: '/admin',
    icon: 'crown',
    name: '管理页',
    access: 'canAdmin',
    routes: [
      { path: '/admin', redirect: '/admin/user' },
      { icon: 'table', path: '/admin/user', component: './Admin/User', name: '用户管理' },
      { icon: 'table', path: '/admin/app', component: './Admin/App', name: '应用管理' },
      { icon: 'table', path: '/admin/review', component: './Admin/Review', name: '审核管理' },
    ],
  },
  {
    path: '/question',
    layout: false,
    routes: [
      { path: '/question', redirect: '/question/list' },
      // { icon: 'table', path: '/question/list', component: './Question/List', name: '问题列表' },
      { icon: 'table', path: '/question/answer', component: './Question/Answer', name: '回答问题' },
    ],
  },
  {
    path: '/app',
    icon: 'crown',
    name: '应用页',
    routes: [
      { path: '/app', redirect: '/app/list' },
      { icon: 'table', path: '/app/list', component: './App/PublicApp', name: '应用列表' },
      { icon: 'table', path: '/app/my', component: './App/MyApp', name: '我的应用' },
      { icon: 'table', path: '/app/history', component: './App/AnswerHistory', name: '答题历史记录' },
      { icon: 'table', path: '/app/build', component: './App/BuildApp', name: '应用制作' },
    ],
  },
  { path: '/', redirect: '/welcome' },
  { path: '*', layout: false, component: './404' },
];
